package com.example.origin.spider.controller;


import com.example.origin.spider.webmagic.AbstractProcessor;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

@RestController
public class DemoController {

    @Resource
    private Map<String, AbstractProcessor> defaultProcessorMap;


    @PatchMapping("/demo/{path}")
    public void test(@PathVariable("path") String path){
        defaultProcessorMap.get(path).start();
    }


}
